<?php

$_SESSION["write"]["lop"]=$lop;
$_SESSION["write"]["monhoc"]=$monhoc;
$_SESSION["write"]["socaudung"]=$countcorrect;
$_SESSION["write"]["socausai"]=$countincorrect;
$_SESSION["write"]["listcaudung"]=$correctlist;
$_SESSION["write"]["listcausai"]=$incorrectlist;

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<table width="900" align="center" border="1" bordercolor="red">
<tr>
<td >
Lớp <?php echo $lop;

?>

</td>
<td>
Môn Học <?php echo $monhoc; 

?>
</td>
<td colspan="2">
Số Câu Đúng <?php echo $countcorrect; 

?>
</td>
<td colspan="1">
Số Câu Sai <?php echo $countincorrect; 

?>
</td>
<td>
<a href="#" onclick="javascript:popitup('exportexcel.php?done=1');" ><img alt="downloaod icon" src="images/download.png" ></a>
</td>
</tr>
<tr>
<tr>
<td colspan="6" align="center" class="classmenu" >
Những Câu bạn đã làm đúng
</td>
</tr>
<tr class="classtopmenu">
<td width="50%">
Câu Hỏi
</td>
<td>
Trả Lời A
</td>
<td>
Trả Lời B
</td>
<td>
Trả Lời C
</td>
<td>
Trả Lời D
</td>
<td>
Đáp Án
</td>
</tr>
<?php 

foreach($correctlist as $correctline)
{
?>
<tr>

<td>
<?php echo $correctline['cauhoi'];?>
</td>
<td>
<?php echo $correctline['a'];?>
</td>
<td>
<?php echo $correctline['b'];?>
</td>
<td>
<?php echo $correctline['c'];?>
</td>
<td>
<?php echo $correctline['d'];?>
</td>
<td>
<?php echo $correctline['dapan'];?>
</td>
</tr>

<?php 
}

?>
<tr>
<td colspan="6" align="center" class="classmenu" >
Những Câu bạn đã làm sai
</td>
</tr>
<tr class="classtopmenu">
<td width="50%" >
Câu Hỏi
</td>
<td>
Trả Lời A
</td>
<td>
Trả Lời B
</td>
<td>
Trả Lời C
</td>
<td>
Trả Lời D
</td>
<td>
Đáp Án
</td>
</tr>
<?php 

foreach($incorrectlist as $incorrectline)
{
?>
<tr>

<td>
<?php echo $incorrectline['cauhoi'];?>
</td>
<td>
<?php echo $incorrectline['a'];?>
</td>
<td>
<?php echo $incorrectline['b'];?>
</td>
<td>
<?php echo $incorrectline['c'];?>
</td>
<td>
<?php echo $incorrectline['d'];?>
</td>
<td>
<?php echo $incorrectline['dapan'];?>
</td>
</tr>

<?php 
}

?>
</table>

</html>